{include file="inc/index_header.html"} 
<?php
$this->_var['indexjs'][] = $this->_var['TMPL_REAL']."/js/index.js";
$this->_var['cpindexjs'][] = $this->_var['TMPL_REAL']."/js/index.js";
$this->_var['indexocss'][] = $this->_var['TMPL_REAL']."/css/index_open.css";
?>
<script type="text/javascript" src="{$APP_ROOT}/public/runtime/app/deal_cate_conf.js"></script>
<script type="text/javascript" src="{$APP_ROOT}/public/runtime/app/deal_region_conf/{$deal_city.id}.js"></script>
<script type="text/javascript" src="{function name="parse_script" v="$indexjs" c="$cpindexjs"}"></script>
<link rel="stylesheet" type="text/css" href="{function name="parse_css" v="$indexocss"}" />
<style type="text/css">
	.adv img{width:200px;}
</style>
<div style="background:#f9f9f0;">
<div class="in_center">
	<div class="index_left f_l">
		
	</div>
	<div class="index_middle">
		<div id="main_adv_box" class="main_adv_box f_l">
			<div id="main_adv_img" class="main_adv_img">
				<span rel="1"><adv adv_id="首页广告位1" /></span>
				<span rel="2"><adv adv_id="首页广告位2" /></span>
				<span rel="3"><adv adv_id="首页广告位3" /></span>					
			</div>
			<div id="main_adv_ctl" class="main_adv_ctl">
				<ul>
					<li rel="1">1</li>
					<li rel="2">2</li>
					<li rel="3">3</li>
				</ul>
			</div>
			<script type="text/javascript" src="{$TMPL}/js/index_adv.js"></script>
		</div>
		<div class="blank"></div>
		<div class="hot_vouche">
			<h3 class="clearfix"><a href="{url x="store" r="ycate"}">更多现金券>></a><span>热门现金券</span></h3>
			{foreach from=$hot_vouche item=hot_vouche name=hot_vouche}
			<div class="vouche" {if $smarty.foreach.hot_vouche.last}style="margin-right:0px;{/if}">
				<a href="{$hot_vouche.url}" title="{$hot_vouche.name}" class="goods_img_box" target="_blank"><img src="{function name="get_spec_image" v=$hot_vouche.icon w="160" h="100" gen=1}"  alt="{$hot_vouche.name}" width=165 height=90  class="lazy" /></a>
				<p><a href="{$hot_vouche.url}" target="_blank">{function name="msubstr" v=$hot_vouche.supplier_name b=0 e=9}{$hot_vouche.discount}折</a></p>
				<p class="i_p"><strong>{$hot_vouche.format_current_price}</strong><span>原价:{$hot_vouche.format_origin_price}</span></p>
			</div>	
			{/foreach}
			<div style="clear:both;"></div>
		</div>
	</div>
	<div class="on_right">
		<div class="right_div">
			<p class="p1">登录后，进入我的订餐服务</p>
			<p>在{$city_name}我发现了<strong>{$c_supplier_count}</strong>商户</p>
			<p class="p3"><a class="dp" title="我要点评" href="{url x="store" y="index"}" target="_blank"></a></p>
		</div>
		<div class="right_div right_hei i_topic">
			<h3>今日热点</h3>
			<ul>
				{foreach from=$hot_topic item=hot_topic name=hot_topic}
				<li><a href="{$hot_topic.url}" {if $smarty.foreach.hot_topic.first}style="color:#ed1b24;"{/if}>{function name="msubstr" v=$hot_topic.title b=0 e=14}</a></li>
				{/foreach}
			</ul>
		</div>
		<div class="right_div right_hei i_activity">
			<h3>活动公告</h3>
			<ul>
				{foreach from=$hot_activity item=hot_activity}
				<li><a href="{$hot_activity.url}">{function name="msubstr" v=$hot_activity.title b=0 e=14}</a></li>
				{/foreach}
			</ul>
		</div>
		<div class="mobile_down">
			<a href="{url x="shop" r="mobile"}" target="_blank" title="手机客户端下载"></a>
		</div>
	</div>
	<div class="clear"></div>
</div>
</div>
<div style="height:13px;"></div>
<div class="in_center down">
	<div class="down_store">
		<div class="istore_top">
			<h3 title="餐厅推荐"></h3>
			<ul class="down_store" id="index_purpose">
				<li class="first"><a href="javascript:void(0);" onclick="load_hot_store()">餐厅推荐</a></li>
				{foreach from=$res_purpose_list item=purpose name=purpose}
				{if $smarty.foreach.purpose.index lt 5}
					<li class="p_{$purpose.id}"><a href="javascript:void(0);" onclick="load_purpose_store({$purpose.id})" >{$purpose.name}</a></li>
				{/if}
				{/foreach}
			</ul>
			<a class="i_more" href="{url x="store" r="index"}" target="_blank">更多餐厅>></a>
			<div class="clear""></div>
		</div>
		<div class="istore_con" id="ajax_purpose_store">
			{if $hot_store_list}
			{foreach from=$hot_store_list item=store name=store}
			<div class="s_info">
				<a href="{$store.url}" title="{$store.name}"><img src="{function name="get_spec_image" v=$store.preview w=180 h=137 g=1}"  width=180 height=137  class="lazy" alt="{$store.name}" width=96 height=96 /></a>
				<p class="store_name"><a href="{$store.url}">{function name="msubstr" v=$store.name b=0 e=12}</a></p>
				<p >人均：<span class="people">{$store.avg_price}</span></p>
				<p>地址：<span title="{$store.address}">{function name="msubstr" v=$store.address b=0 e=10}</span></p>
				<div class="p_yu">
					<span class="p_hui" title="总评：{function name="round" val="$store.avg_point" p="1"}分"><span style="width:{$store.avg_point_100}%" class="p_r"></span></span>
					<a class="s_yu" href="{url x="store" r="view" y="id=$store.id" }" target="_blank"></a>
				</div>
			</div>
			{/foreach}
			<div class="clear"></div>
			{else}
			<div class="no_store">
				暂时还没有哦
			</div>
			{/if}
		</div>
	</div>
	<div class="blank"></div>
	<div class="down_adv"><adv adv_id="首页中部广告" /></div>
	<script type="text/javascript">
	</script>
	{if $index_tuan_list}
	<div class="down_box down_tuan">
		{include file="index_ajax/index_tuan.html"} 
	</div>
	{/if}
	{if $free_youhui_list}
	<div class="down_box down_youhui">
		<div class="youhui_on">
			<h3 title="优惠券推荐"></h3>
			<ul class="down_cate">
				{foreach from=$index_tuan_cate item=tuan_cate name=tuan_cate}
				<li><a href="{url x="store" r="fcate" y="cid=$tuan_cate.id"}" target="_blank">{$tuan_cate.name}</a>{if !$smarty.foreach.tuan_cate.last}|{/if}</li>
				{/foreach}
				<li><a href="{url x="store" r="fcate"}" target="_blank">更多优惠券>></a></li>
			</ul>
			<div style="clear:both;"></div>
		</div>
		<div class="down_border">
			{foreach from=$free_youhui_list item=youhui_list name=youhui_list}
			<div class="youhui_con f_l">
				<div class="youhui_row">
					<div class="youhui_tag_{$youhui_list.youhui_type}"></div>
					<a href="{$youhui_list.url}" title="{$youhui_list.name}" target="_blank"><img  class="lazy" width=180 height=137 src="{function name="get_spec_image" v=$youhui_list.icon w="180" h="137" gen=1}"  alt="{$youhui_list.name}"/></a>
				</div>
				<p class="sp_name"><a href="{$youhui_list.url}" target="_blank">{function name="msubstr" v=$youhui_list.name b=0 e=12}</a></p>
				<p class="yh_print">本券累计下载&nbsp;&nbsp;{$youhui_list.print_count}</p>				
			</div>
			{/foreach}
			<div class="clear"></div>
		</div>
	</div>
	{/if}
	{if $event_list}
	<div class="down_box down_event">
		<div class="event_on">
			<h3 title="活动推荐"></h3>
			<ul class="down_cate">
				{foreach from=$event_cate_list item=event_cate name=event_cate}
				<li><a href="{url x="store" r="event" y="cid=$event_cate.id"}" target="_blank">{$event_cate.name}</a>{if !$smarty.foreach.event_cate.last}|{/if}</li>
				{/foreach}
				<li><a href="{url x="store" r="event"}" target="_blank">更多活动>></a></li>
			</ul>
			<div style="clear:both;"></div>
		</div>
		<div class="down_border">
			{foreach from=$event_list item=event name=event}
			 <div class="event_con f_l">
				<a href="{url x="store" r="edetail" p="id=$event.id"}" title="{$event.name}" target="_blank"><img src="{function name="get_spec_image" v=$event.icon w="180" h="137" gen=1}"   width=180 height=137  class="lazy" alt="{$event.name}"/></a>
				<p class="event_name"><a href="{url x="store" r="edetail" p="id=$event.id"}" target="_blank">{function name="msubstr" v=$event.name b=0 e=12}</a></p>
				<p class="event_time">
					时间:
					{if $event.event_begin_time eq 0}
					{else}
					{function name="to_date" v=$event.event_begin_time f="Y-m-d"} 
					{/if}	
						
					{if $event.event_end_time eq 0}
					{$LANG.NO_END_TIME}
					{else}
					{$LANG.TO} {function name="to_date" v=$event.event_end_time f="Y-m-d"}
					{/if}
				</p>	
				<p class="submit_count">报名:{$event.submit_count}人</p>				
			 </div>
			{/foreach}
			<div class="clear"></div>
		</div>
	</div>
	{/if}
</div><!--end down-->
<div class="blank"></div>
{include file="inc/footer.html"}